package ChatPackage;

import java.util.ArrayList;

public class Chat{
	
	//***************************************Class Variables*******************************************//
	private String _userChatID;
	private ArrayList<String> _msgQueue;
	private int _unreadMsgNum;

	//***************************************Constructors*******************************************//

	public Chat(String userChatId) {
		this._userChatID = userChatId;
		this._msgQueue = new ArrayList<String>();
		this._unreadMsgNum = 0;
	}

	//***************************************Public Methods*******************************************//

	public synchronized void addNewMessage(String msg){
		this._msgQueue.add(msg);
		this._unreadMsgNum ++;
	}
	
	public String getUserAndID(){
		return this._userChatID;
	}
	
	/*public String getUserGoogleAcount(){
		return this._userChat.get_google_account();
	}*/

	public synchronized ArrayList<String> getMsgList(){
		this._unreadMsgNum = 0;
		return this._msgQueue;
	}

	
	//***************************************Private Methods*******************************************//


	//***************************************Protected Methods*******************************************//	

}

